package com.zzti.Thired;

import java.io.Serializable;

public class Employee implements Serializable{

/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
/* (non-Javadoc)
 * @see java.lang.Object#hashCode()
 */
@Override
public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + age;
	result = prime * result + ((dapartment == null) ? 0 : dapartment.hashCode());
	result = prime * result + ((name == null) ? 0 : name.hashCode());
	result = prime * result + ((sex == null) ? 0 : sex.hashCode());
	result = prime * result + ((type == null) ? 0 : type.hashCode());
	result = prime * result + year;
	return result;
}

/* (non-Javadoc)
 * @see java.lang.Object#equals(java.lang.Object)
 */
@Override
public boolean equals(Object obj) {
	if (this == obj)
		return true;
	if (obj == null)
		return false;
	if (getClass() != obj.getClass())
		return false;
	Employee other = (Employee) obj;
	if (age != other.age)
		return false;
	if (dapartment == null) {
		if (other.dapartment != null)
			return false;
	} else if (!dapartment.equals(other.dapartment))
		return false;
	if (name == null) {
		if (other.name != null)
			return false;
	} else if (!name.equals(other.name))
		return false;
	if (sex == null) {
		if (other.sex != null)
			return false;
	} else if (!sex.equals(other.sex))
		return false;
	if (type == null) {
		if (other.type != null)
			return false;
	} else if (!type.equals(other.type))
		return false;
	if (year != other.year)
		return false;
	return true;
}

/* (non-Javadoc)
 * @see java.lang.Object#toString()
 */
@Override
public String toString() {
	return "Employee [name=" + name + ", sex=" + sex + ", age=" + age + ", dapartment=" + dapartment + ", type=" + type
			+ ", year=" + year + "]";
}
private String name;
private String sex;
private int age;
private  String dapartment;
private String type;
private int year;
/**
 * @return the id
 */

public Employee() {
	
}
/**
 * @param id the id to set
 */

/**
 * @return the name
 */
public String getName() {
	return name;
}
/**
 * @param name the name to set
 */
public void setName(String name) {
	this.name = name;
}
/**
 * @return the sex
 */
public String getSex() {
	return sex;
}
/**
 * @param sex the sex to set
 */
public void setSex(String sex) {
	this.sex = sex;
}
/**
 * @return the age
 */
public int getAge() {
	return age;
}
/**
 * @param age the age to set
 */
public void setAge(int age) {
	this.age = age;
}
/**
 * @return the dapartment
 */
public String getDapartment() {
	return dapartment;
}
/**
 * @param dapartment the dapartment to set
 */
public void setDapartment(String dapartment) {
	this.dapartment = dapartment;
}
/**
 * @return the type
 */
public String getType() {
	return type;
}
/**
 * @param type the type to set
 */
public void setType(String type) {
	this.type = type;
}
/**
 * @return the year
 */
public int getYear() {
	return year;
}
/**
 * @param year the year to set
 */
public void setYear(int year) {
	this.year = year;
}
}